var processResults = function(response) {
        var msg = $.parseJSON(response);
        var results = msg.results;
        console.log(results);
        var offers =[];
        for( var i in results ) {
            if (results.hasOwnProperty(i)){
                if (isNumber(i)){
                    offers[i] = results[i];
                    var node = $('.results'+i);
                    node.text('Przyjęto: '+results[i]);
                    if(results[i] == 0) {
                        node.css({'background':'tomato'});
                    } else{
                        node.css({'background':'greenyellow'});
                    }
                    node.css({'border':'1px dotted','text-align':'center'});
                }
            }
        }
};

function isNumber(n) {
  return !isNaN(parseFloat(n)) && isFinite(n);
}